<!-- head -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>管理中心</a></li>
			<li class="active"><strong>公告·指定商户·范围管理</strong></li>
		</ol>
	</div>
</div>

<!-- content-->
<div class="wrapper wrapper-content animated fadeIn" ng-controller="noticeMerchantSettings">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>范围管理查询</h5>
						<!--<div ibox-tools></div>-->
					</div>
					<div class="ibox-content">
						<div class="form-group">
							<input type="hidden" placeholder="通告ID" class="form-control" readonly
								   ng-model='queryInfo.noticeId'>
							<label class="col-sm-2 control-label">商户名称：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" ng-model='queryInfo.merchantName'>
							</div>
							<label class="col-sm-2 control-label">商户编号：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" ng-model='queryInfo.merchantNo'>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">商户手机号：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" ng-model='queryInfo.mobilephone'>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-8">
								<button class="btn btn-primary6 btn-mr20" type="button" id="btnSubmit" ng-click="queryFunc()">查询</button>
								<button class="btn btn-primary5 btn-mr20" type="button" ng-click="showAddNoticeMerScopeModal()">新增</button>
								<button class="btn btn-new btn-mr20" type="button" ng-click="showImportNoticeMerScopeModal()">批量导入</button>
								<button class="btn btn-primary3" type="button" ng-click="resetForm()">清空</button>
							</div>
						</div>
					</div>
				</div>

				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>范围管理-名单列表</h5>
						<!--<div ibox-tools="" class="ng-scope"></div>-->
					</div>
					<div class="ibox-content">
						<div class="gridStyle" ui-grid="queryResultGrid" ui-grid-pagination
							 ui-grid-resize-columns></div>
					</div>
				</div>
			</div>
		</div>
	</form>

	<div id="addNoticeMerScopeModal" class="modal fade" tabindex="-1" role="dialog">
		<div class="modal-dialog" role="document" style="width: 900px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">新增范围</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal">
					<div class="form-group">
						<label class="col-sm-3 control-label">商户编号：</label>
						<div class="col-sm-4">
							<input type="text" ng-model="addInfo.queryKey" class="form-control" style="width:auto;display:inline-block;" ng-change="queryMerInfo()">
						</div>
						<label class="col-sm-2 control-label">商户名称：</label>
						<div class="col-sm-3">
							<input type="text" readonly ng-model="addInfo.merchantName" class="form-control" style="width:auto;display:inline-block;">
						</div>
					</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" ng-click="addNoticeMerScope()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->

	<div id="importNoticeMerScopeModal" class="modal fade" tabindex="-1" role="dialog">
		<div class="modal-dialog" role="document" style="width: 900px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">批量导入</h4>
					<div ng-show="importStatus" class="timg" style="z-index: 99999999"></div>
				</div>
				<div class="modal-body">
					<form class="form-horizontal">
						<div class="form-group">
							<label class="col-sm-3 control-label">操作：</label>
							<div class="col-sm-4">
								<select class="form-control" name="importType" ng-model="importInfo.importType" style="width:250px;">
									<option value="0">覆盖导入</option>
									<option value="1">追加导入</option>
								</select>
							</div>
							<label class="col-sm-1" ></label>
							<div class="col-sm-3 checkbox">
								<a href="downLoad/template?templateName=ImportNoticeMerScope&type=xlsx">导入模板下载</a>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label">导入文件：</label>
							<div class="col-sm-4" style="padding-top: 4px">
								<input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
								<table class="table">
									<tbody>
									<tr ng-repeat="item in uploader.queue">
										<td>
											<strong>{{ item.file.name }}</strong>
										</td>
										<td nowrap>
											<button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
												<span class="glyphicon glyphicon-trash"></span>删除
											</button>
										</td>
									</tr>
									</tbody>
								</table>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" ng-click="importData()" ng-disabled="importStatus">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
</div>
